function countDown(obj, endTime) {
    var time_start = new Date().getTime(); //设定当前时间
    var time_end = parseInt(endTime); //设定目标时间
    // 计算时间差
    var time_distance = time_end - time_start;
    // 天
    var int_day = Math.floor(time_distance / 86400000);
    time_distance -= int_day * 86400000;
    // 时
    var int_hour = Math.floor(time_distance / 3600000);
    time_distance -= int_hour * 3600000;
    // 分
    var int_minute = Math.floor(time_distance / 60000);
    time_distance -= int_minute * 60000;
    // 秒
    var int_second = Math.floor(time_distance / 1000);
    // 时分秒为单数时、前面加零
    if (int_day < 10 && int_day > 0) {
        int_day = "0" + int_day;
    } else if (int_day < 0) {  // 日期已过
        if (obj == '#yushou-time') {
            $(obj).html("预售已结束");
            $(".twox").removeClass('c2').addClass("huise");
            $(".twox .p2").html("预售已结束");
        } else {
            if ($(obj).hasClass('oneTime')) {
                $(obj).html("已");
            } else {
                $(obj).html("已到时间");
            }

        }
        return false;
    }
    if (int_hour < 10) {
        int_hour = "0" + int_hour;
    }
    if (int_minute < 10) {
        int_minute = "0" + int_minute;
    }
    if (int_second < 10) {
        int_second = "0" + int_second;
    }
    if (int_day <= 0 && int_hour <= 0 && int_minute <= 0 && int_second <= 0) {
        if (obj == '#yushou-time') {
            $(obj).html("预售已结束");
            $(".twox").removeClass('c2').addClass("huise");
            $(".twox .p2").html("预售已结束");
        } else {
            if ($(obj).hasClass('oneTime')) {
                $(obj).html("已");
            } else {
                $(obj).html("已到时间");
            }

        }
        return false;
    }
    // 显示时间
    if (int_day > 0) {
        var result = parseInt(int_day) + "天" + int_hour + ":" + int_minute + ":" + int_second;
    } else {
        var result = int_hour + ":" + int_minute + ":" + int_second;
    }
    $(obj).text(result);
    // 设置定时器
    setTimeout("countDown(" + "'" + obj + "'" + "," + endTime + ")", 1000);
}